package com.meilai.project.entity.system;


import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.meilai.project.core.bean.SuperEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author 张驰
 * @since 2022-04-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "message_center")
@ApiModel(value="MessageCenter对象", description="")
public class MessageCenter extends SuperEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 1、系统消息
     * 2、审批消息，需要当前人审批
     * 3、抄送消息，审批流程中定义的传阅人为当前人
     * 4、任务消息，任务派发模块
     * 5、提醒消息，工作台-日历表，自定义的事件提醒
     * 6、推送消息，其他用户操作后推送（例如，调度人员完成锁位后，需要给客户的跟进销售员推送消息）
     */
    @ApiModelProperty(value = "类型，1系统，2审批，3抄送，4任务，5提醒，6推送，7其他")
    private Integer type;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "跳转路由名称")
    private String to_router_name;

    @ApiModelProperty(value = "跳转路由参数")
    private String to_router_params;

    @ApiModelProperty(value = "跳转路由路径")
    private String to_router_path;

    @ApiModelProperty(value = "跳转路由名查询值")
    private String to_router_querys;

    @ApiModelProperty(value = "审批抄送相关-类型id")
    private Integer flow_type;

    @ApiModelProperty(value = "审批抄送相关-审批流id")
    private Long wf_data_id;

    @ApiModelProperty(value = "审批抄送相关-数据id")
    private Long data_id;

    @ApiModelProperty(value = "审批相关-流程状态，1待审，2通过，3退回")
    private Integer flow_status;

    @ApiModelProperty(value = "任务类型相关-任务id")
    private Long mission_id;

    @ApiModelProperty(value = "提醒类型相关-提醒id")
    private Long tip_id;

    @ApiModelProperty(value = "用户id")
    private Long user_id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime created_at;

    @ApiModelProperty(value = "已读时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime read_at;
}
